/*
 * @Author: 生俊甫 1758142861@qq.com
 * @Date: 2024-10-11 20:02:19
 * @LastEditors: 生俊甫 1758142861@qq.com
 * @LastEditTime: 2024-10-11 21:12:21
 * @FilePath: /sjf/2024-project/2024_centos/test_to_c/tree_test/tree.h
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
#ifndef _TREE_H_
#define _TREE_H_

#include "queue.h"
#include <time.h>

typedef int BNDataType;

typedef struct BinaryTreeNode
{
    BNDataType _data;
    struct BinaryTreeNode* _left;
    struct BinaryTreeNode* _right;
}BTNode;

void pre_order(BTNode* tree);
void in_order(BTNode* tree);
void post_order(BTNode* tree);
int tree_size(BTNode* tree);
int tree_leaf_size(BTNode* tree);
int tree_k_size(BTNode* tree,int k);
int tree_depth(BTNode* tree);
BTNode* tree_find(BTNode* tree,int x);
BTNode* buy_node(BNDataType x);
void tree_destroy(BTNode* tree);
void level_order(BTNode* tree);
bool binary_tree_complete(BTNode* tree);

#endif